import {
  createRouter,
  createWebHashHistory
} from 'vue-router'
import HomeView from '../views/HomeView.vue'
import homeRouter from '../views/home/home'

const routes = [{
    path: '/home',
    name: 'home',
    component: HomeView,
    children: [...homeRouter]
  },
  {
    path: '/login',
    name: 'login',
    component: () => import( '../views/login/login.vue')
  },
   {
     path: '/smslogin',
     name: 'smslogin',
     component: () => import('../views/login/smslogin.vue')
   },
   {
     path: '/info',
     name: 'info',
     component: () => import('../views/mine/userInfo.vue')
   },
   {
     path: '/setPassword',
     name: 'setPassword',
     component: () => import('../views/mine/setPassword.vue')
   },
   {
     path: '/options',
     name: 'options',
     component: () => import('../views/mine/options.vue')
   },
   {
     path: '/teacherDetail',
     name: 'teacherDetail',
     component: () => import('../views/teacher/teacherDetail.vue')
   },
   {
     path: '/Concern',
     name: 'Concern',
     component: () => import('../views/teacher/Concern.vue')
   },
   {
     path: '/coursedet',
     name: 'coursedet',
     component: () => import('../views/course/coursedet.vue')
   },
   {
     path: '/search',
     name: 'search',
     component: () => import('../views/course/search.vue')
   },
   {
     path: '/oto',
     name: 'oto',
     component: () => import('../views/course/oto.vue')
   },
  {
    path: '/',
    redirect: '/index',
    
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router